<%--
  Created by IntelliJ IDEA.
  User: ASUS
  Date: 2021/11/17
  Time: 20:52
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Page</title>
</head>
<body>
<%--    <%--%>
<%--        pageContext.setAttribute("name","tom");--%>
<%--        request.setAttribute("name","tom");--%>
<%--        //分别转发到第二个jsp页面--%>
<%--        request.getRequestDispatcher("page2.jsp").forward(request,response);--%>
<%--    %>--%>
<%--<%--%>
<%--    request.setAttribute("name","tom");--%>
<%--    session.setAttribute("name","tom");--%>
<%--    //分别重定向跳转到第二个jsp页面--%>
<%--    response.sendRedirect("page2.jsp");--%>
<%--%>--%>
<%
    session.setAttribute("name","marry");
    application.setAttribute("name","tom");
%>
</body>
</html>
